@extends('public.base')
@section('body')
<style>
    .layui-unselect dl {
        max-height: 160px;
    }

    html {
        background-color: #fff;
    }
</style>
<div class="layui-row">


    <form id="main_form" class="layui-form layui-form-pane" action="" method="post" lay-filter="main-form-group">
        <!-- ==================================  隐藏区  ================================== -->
        <input type="hidden" name="id" value="">

        <div class="layui-card">
            <div class="layui-card-body media-body">
                <div class="layui-colla-content  layui-show cmdlist-container">
                    <p>{{$data->title}}</p>
                    <hr />
                </div>

                @if ($data->type==1)
                    <?php if(!isset($vo['child'])){
                        $img=explode(",",$data->show_val);
                        foreach ($img as  $k=>$v){
                            echo '<br>==================='.($k+1).'===============<br><img class="h-img" src="'.$v.'" style=" width:100%;
    height:auto;">';
                        }
                    }?>

                    @else
                    <a href="{{$data->show_val}}"  class="layui-btn layui-btn-xs layui-btn-danger">下载</a>
                    <div id="video" data-url="{{$data->show_val}}"></div>
                @endif



            </div>
        </div>

        <!-- 按钮区 -->

    </form>
</div>
<script src="{{ADMIN_PATH}}layui/layuiadmin/layui/layui.js"></script>
<script src="{{ADMIN_PATH}}js/admin.common.js?1322"></script>
<script src="{{COMMON_PATH}}js/lzystring.js"></script>

<script type="text/javascript">
    layui.config({
        base: '{{ADMIN_PATH}}layui/layuiadmin/' //静态资源所在路径
    }).extend({
        //index: 'lib/index', //主入口模块
        ckplayer: 'lib/ckplayer/ckplayer'
    }).use(['jquery', 'ckplayer'], function(){
        var $ = layui.$,
            ckplayer = layui.ckplayer;
        var vUrl = $('#video').data('url'),
            videoObject = {
                container: '#video',
                loop: true,
                autoplay: true,
                video: [
                    [vUrl, 'video/mp4']
                ]
            };
        var player = new ckplayer(videoObject);
    });

</script>
@stop
